//
//  LPKNetWorkTools.h
//  Demo-01
//
//  Created by 李平宽 on 2017/1/21.
//  Copyright © 2017年 com.lpk. All rights reserved.
//

#import "AFHTTPSessionManager.h"

typedef NS_ENUM(NSInteger , LPKNetWorkToolsMethod) {
    GET = 0,
    POST = 1
};

@interface LPKNetWorkTools : AFHTTPSessionManager

/**
 网络请求单例
 */
+ (instancetype)sharedNetWorkTools;

/**
 网络请求公共接口
 
 @param method GET || POST
 @param urlString Url地址
 @param parameters 请求参数
 @param success 成功回调
 @param failure 失败回调
 */
- (void)request:(LPKNetWorkToolsMethod)method urlSrting:(NSString *)urlString parameters:(id)parameters  success:(void(^)(id responseObject))success failure:(void(^)(NSError *error))failure;

/**
 首页视图请求数据
 
 @param date 请求参数
 @param success 成功回调
 @param failure 失败回调
 */
- (void)HomeViewData:(NSString *)date success:(void(^)(id responseObject))success failure:(void(^)(NSError *error))failure;

/**
 首页跳转详情页面网络请求

 @param Id _id 详情id
 @param success 成功回调
 @param failure 失败回调
 */
- (void)homeViewDetailDataId:(NSString *)Id success:(void(^)(id responseObject))success failure:(void(^)(NSError *error))failure;

@end
